package com.neusoft.neu24.nep.service.impl;


import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.neusoft.neu24.nep.entity.Account;
import com.neusoft.neu24.nep.entity.CommonResult;
import com.neusoft.neu24.nep.entity.HttpCodeEnum;
import com.neusoft.neu24.nep.mapper.AccountMapper;
import com.neusoft.neu24.nep.service.IAccountService;
import org.springframework.stereotype.Service;

@Service
public class AccountServiceImpl extends ServiceImpl<AccountMapper, Account> implements IAccountService {
    @Override
    public CommonResult pay(String wxid, Integer money) {
        int i = baseMapper.pay(wxid, money);
        if (i == 1) {
            return CommonResult.sucess(1);
        } else {
            return CommonResult.filure(HttpCodeEnum.SYSTEM_ERROR);
        }
    }
}
